'''
gui definitions model for the aui-frame-manager

xxx
'''

# definitions

defImports = ["genFrames","main_startup"]

defBasePerspectiveli = []

defPerspectivedi =    {
                    'nullview':['Null-view',
                        []],
                    'navigator':['Navigator',
                        ['modPanel','navPanel','liscleft','liscright',
                        'treepane', 'longTextPanel']],
                    'querywithmod':['Query and modify',
                        ['modPanel','mainlisc','liConPanel']],
                    'querynomod':['Query without modification',
                        ['mainlisc','liConPanel']],
                    'options':['Options',
                        ['paramslisc','paramModPanel']]
                    }


#   third item indicates the enabled-status after db-close(true or false)
defMenuli =    [
                    [
                        ["File","priv"],    # 100
                            [
                            ["Append","New database (copy from template)...", True],
                            ["Append","Open existing database...", True],
                            ["Append","Recently opened...", True],
                            ["Append","Close current database", False],
                            ["AppendSeparator"],
                            ["Append","Database properties", False]
                            ]
                    ],
                    [
                        ["Edit","pub"], # 200
                            [
                            ["Append","Some future thing", False]
                            ]
                    ],
                    [
                        ["View","pub"], # 300
                            [
                            ["Append","Modification-panel (modpanel)", False],
                            ["Append","LongText-panel", False]
                            ]
                    ],
                    [
                        ["Tools","pub"],    # 400
                            [
                            ["Append","Exchange with special text-files (for use on mobile devices)", False],
                            ["Append","Import database or exported text-file", True],
                            ["Append","Export query to text-file", True],
                            ["AppendSeparator"],
                            ["Append","Database-level settings", False],
                            ["Append",'Program-level settings', False],
                            ["Append", 'Backup program-level settings to the current database', False],
                            ["Append", 'Restore program-level settings from the current database', False]
                            ]
                    ],
                    [
                        ["Window-sets","pub"],    # 500
                            [
                            ["AppendRadioItem",'Navigator', False],
                            ["AppendRadioItem",'Query - Tasks and calendar', False],
                            ["AppendRadioItem",'Query - anything', False],
                            ["AppendRadioItem",'Database-level settings', False],
                            ["AppendRadioItem",'Program-level settings', False],
                            ["AppendSeparator"],
                            ["Append","Save current view as custom-set number 1", False],
                            ["Append","Save current view as custom-set number 2", False],
                            ["Append","Save current view as custom-set number 3", False],
                            ["Append","Save current view as custom-set number 4", False],
                            ["Append","1 - Load custom-set 1", False],
                            ["Append","2 - Load custom-set 2", False],
                            ["Append","3 - Load custom-set 3", False],
                            ["Append","4 - Load custom-set 4", False]
                            ]
                    ],
                    [
                        ["Help","pub"], # 600
                            [
                            ["Append","Help on Knobjex (pdf-file)", True],
                            ["Append","Check for updates (open website)", True],
                            ["Append","About Knobjex...", True]
                            ]
                    ]
                ]

'''
Toolbar

from wx.python resource
                    [
                        ["first bar",32,32,""],
                            [
                            ["Question","ap","ART_QUESTION"],
                            ["Warning","ap","ART_WARNING"]
                            ]
                    ],

paths:
..\\icons
"M:/EigThuis/Bestanden/Leuk/Hobbies/Programmeren/Python/MijnCode/PyKnow/icons"
'''

defToolbarli =  [
                    [
                        ["first bar",32,32,""],
                            [
                            ["New database","file","new_file.png","PNG",True],
                            ["Open database","file","open_file.png","PNG",True],
                            ["Open recent db","file","recent_files.png","PNG",True],
                            ["Close database","file","close_file.png","PNG",False],
                            ["Datatbase-information","file","file_info.png","PNG",False]
                            ]
                    ],
                    [
                        ["second bar",32,32,"M:/EigThuis/Bestanden/Leuk/Hobbies/Programmeren/Python/MijnCode/PyKnow/icons"],
                            [
                            ["Main screen","file","main_screen.png","PNG",False],
                            ["Calendar / Task-list","file","calendar.png","PNG", False],
                            ["Filter","file","filter.png","PNG", False],
                            ["Program-settings","file","program_settings.png","PNG", False],
                            ["Database-settings","file","database_settings.png","PNG", False],
                            ["Exchange text-files","file","exchange.png","PNG", False]
                            ]
                    ],
                    [
                        ["third bar",32,32,"M:/EigThuis/Bestanden/Leuk/Hobbies/Programmeren/Python/MijnCode/PyKnow/icons"],
                            [
                            ["1st custom view","file","1st_loup.png","PNG",False],
                            ["2nd custom view","file","2nd_glasses.png","PNG", False],
                            ["3rd custom view","file","3rd_telescope.png","PNG", False],
                            ["4th custom view","file","4th_microscope.png","PNG", False]
                            ]
                    ]
                ]


'''
ADAP HIS
defpaneli format:
    module, pane
        - diverse pane settings
        - control list, with per control:
            keyname:[wx controlname, caption, position tup, size tup, id,
                            event list, style (for some controls)]
Comment:
id - must be ordered sequentially 0,1,2,3...gives also the tab-order!
event list - these events will be bound to the control

ADAP NO

ADAP FU:

Nog implementeren?:
fixed
float
minimizebutton  - nog niet in wxpython zelf
minsize
maxsize
'''

xit = 10    # offset x-direction
yit = 5    # offset y-direction
dxit = 10   # inter-control distance horizonally
dyit = 30   # inter-control distance vertically
ht = 21     # standard control-height
su = 10    # standard unit
dzit = 23   # smaller vertical distance


defPaneli =  [
                    [
                        ["main_startup","navPanel",
                                {
                                'caption':"Navigator",
                                'capvis':True,
                                'pinbut': True,
                                'maxbut': True,
                                'clobut': True,
                                'center': False,
                                'direct': 1,    # clockwise 1 above, 4 left, 5 middle
                                'layer': 1,     # middle 0, higher to the outside
                                'row':0,        # ? re-counting out-to-in on each side, sectorally placed
                                'posit':0,      # ? re-counting cnt-clockwise on each side, concentrally placed
                                'bestsize':(300,160),
                                'minsize':(300,150),
                                }],
                             {
                            "butSampleFilter":["Button","Sample filter",(10,2),(100,23),1,["BUTTON"]],
                            "labFilter":["StaticText","---",(120,5),(),2,["SET_FOCUS"]],
                            "butClearFilter":["Button","Clear",(485,2),(50,23),6,["BUTTON"]],
                            "chkUseFilter":["CheckBox","Use filter",(540,1),(),8,["CHECKBOX"]],
                            "chkHide":["CheckBox","Hide completed",(540,17),(),10,["CHECKBOX"]],
                            "chkTrLoad":["CheckBox","Favorite co-loads treeview",(10,35),(),12,["CHECKBOX"]],
                            "labFavo":["StaticText","Favorites",(190,35),(),14,["SET_FOCUS"]],
                            "cboFavo":["ComboBox","",(260,35),(270,21),16,["COMBOBOX"],['CB_READONLY']],
                            "labHistWalk":["StaticText","Walk hist.",(190,65),(),18,["SET_FOCUS"]],
                            "butBack":["Button","Prev.",(260,65),(130,23),20,["BUTTON"]],
                            "butFor":["Button","Next",(400,65),(130,23),22,["BUTTON"]],
                            "labHist":["StaticText","History",(190,95),(),24,["SET_FOCUS"]],
                            "cboHist":["ComboBox","",(260,95),(270,21),26,["COMBOBOX"],['CB_READONLY']],
                            "labSeek":["StaticText","Seek object",(10,125),(),28,["SET_FOCUS"]],
                            "txtSeek":["TextCtrl","",(70,125),(110,21),30,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                            "labObject":["StaticText","Object(s)",(190,125),(),32,["SET_FOCUS"]],
                            "cboObject":["ComboBox","",(260,125),(270,21),34,["COMBOBOX"]],
                            "butLoad":["Button","Load",(540,125),(50,23),36,["BUTTON"]],
                            "butTrSeek":["Button","T-seek",(595,125),(50,23),38,["BUTTON"]],
                            "butLaunch":["Button","Launch",(650,125),(50,23),40,["BUTTON"]],
                            "butWeb":["Button","Web",(705,125),(50,23),42,["BUTTON"]],
                            "butTrLeft":["Button","T-object left",(540,65),(105,23),44,["BUTTON"]],
                            "chkTrLeft":["CheckBox","Subtr.",(649,70),(),46,["CHECKBOX"]],
                            "chkSngClick":["CheckBox","Single click navigation",(10,95),(),51,["CHECKBOX"]],
##                            "labHistWalk":["StaticText","Walk hist.",(10,95),(),52,["SET_FOCUS"]],
                            "cboTrDepth":["ComboBox","2",(540,95),(46,21),60,["COMBOBOX"]],
                            "butDepthOne":["Button","1",(588,95),(20,23),65,["BUTTON"]],
                            "butDepthTwo":["Button","2",(612,95),(20,23),70,["BUTTON"]],
                            "butDepthThree":["Button","3",(636,95),(20,23),72,["BUTTON"]],
                            "butDepthFour":["Button","4",(660,95),(20,23),74,["BUTTON"]],
                            "butDepthFive":["Button","5",(685,95),(20,23),76,["BUTTON"]],
                            "labTrRoot":["StaticText","Tree root",(10,65),(),80,["SET_FOCUS"]],
                            "cboTrRoot":["ComboBox","",(70,65),(110,21),85,["COMBOBOX"]],
                            "butTrRoot":["Button","T-Root",(540,35),(50,23),90,["BUTTON"]],
                            "butTrObject":["Button","T-Obj",(595,35),(50,23),95,["BUTTON"]],
                             }
                    ],
                    [
                        ["main_startup","modPanel",
                                {
                                'caption':"Modify relation",
                                'capvis':True,
                                'pinbut': True,
                                'maxbut': True,
                                'clobut': True,
                                'center': False,
                                'direct': 3,
                                'layer': 1,
                                'row':0,
                                'bestsize':(300,180),
                                'minsize':(300,180),
                                'posit':0,
                                }],
                             {
                            "labChanges":["StaticText","Modify",(xit,yit),(3*su,ht),1,["SET_FOCUS"]],
                            "butLoadLists":["Button","Load lists",(xit + dxit + 4*su, yit),(6*su,ht),2,["BUTTON"]],
                            "butNew":["Button","New",(xit + 3*dxit + 9*su, yit),(5*su,ht),4,["BUTTON"]],
                            "butNewLe":["Button","New left",(xit + 4*dxit + 14*su, yit),(9*su,ht),5,["BUTTON"]],
                            "butNewClip":["Button","New clip(r)",(xit + 5*dxit + 23*su, yit),(9*su,ht),6,["BUTTON"]],
                            "butNewRi":["Button","New right",(xit + 6*dxit + 32*su, yit),(9*su,ht),7,["BUTTON"]],
                            "butDelete":["Button","Del !",(xit + 8*dxit + 65*su, yit),(4*su,ht),8,["BUTTON"]],
##                            "labSamSource":["StaticText","S.s.",(xit + 10*dxit + 51*su, yit),(2*su,ht),9,["SET_FOCUS"]],
                            "cboSamSource":["ComboBox","",(xit + 8*dxit + 54*su, yit),(10*su,ht),9,["COMBOBOX"]],
                            "labRelID":["StaticText","RelID",(xit,yit+dyit),(4*su,ht),10,["SET_FOCUS"]],
                            "txtRelID":["TextCtrl","",(xit + 4*su + dxit,yit + dyit),(6*su,ht),11,["TEXT"]],
                            "labSubject":["StaticText","Subject",(xit + 2*dxit + 10*su,yit + dyit),(5*su, ht),12,["SET_FOCUS"]],
                            "cboSubject":["ComboBox","",(xit + 3*dxit + 15*su,yit + dyit),(30*su,ht),13,["COMBOBOX"]],
                            "butPlusSeven":["Button","+7",(xit + 0.5*dxit + 48.0*su,yit + dyit),(2.5*su,ht),14,["BUTTON"]],
                            "butMinOne":["Button","-1",(xit + 0.5*dxit + 51*su,yit + dyit),(2.5*su,ht),15,["BUTTON"]],
                            "butPlusOne":["Button","+1",(xit + 0.5*dxit + 54*su,yit + dyit),(2.5*su,ht),16,["BUTTON"]],
                            "butMsDate":["Button","Date",(xit + 0.5*dxit + 57*su,yit + dyit),(4*su,ht),17,["BUTTON"]],
                            "butMsDateClear":["Button","C",(xit + 0.5*dxit + 61.5*su,yit + dyit),(2*su,ht),18,["BUTTON"]],
                            "txtMsDate":["TextCtrl","",(xit + 6*dxit + 58*su, yit + dyit ),(13*su,ht),19,["TEXT"]],
                            "labOb1":["StaticText","Object1",(0.5*xit, yit + 2*dyit),(4.5*su,ht),20,["SET_FOCUS"]],
                            "cboOb1":["ComboBox","",(xit + dxit + 4*su, yit + 2*dyit),(20*su,ht),21,["COMBOBOX"]],
                            "labRel":["StaticText","Rel",(xit + 2*dxit + 24*su,2*yit + 2*dyit),(3*su,ht),22,["SET_FOCUS"]],
                            "cboRel":["ComboBox","",(xit + 3*dxit + 27*su,yit + 2 * dyit),(20*su,ht),23,["COMBOBOX"]],
                            "labOb2":["StaticText","Object2",(xit + 4*dxit + 47*su, yit + 2*dyit),(4.5*su,ht),24,["SET_FOCUS"]],
                            "cboOb2":["ComboBox","",(xit + 5*dxit + 52*su, yit + 2*dyit),(20*su,ht),25,["COMBOBOX"]],
                            "butSave":["Button","Save",(xit + 7*dxit + 41*su, yit),(12*su,ht), 27,["BUTTON"]],
                            "labSource":["StaticText","Source",(xit,yit + 3*dyit),(5*su,ht),29,["SET_FOCUS"]],
                            "cboSource":["ComboBox","",(xit + dxit + 4*su, yit + 3*dyit),(12*su,ht),30,["COMBOBOX"]],

                            "labRemark":["StaticText","Remark",(xit +1.5*dxit + 17*su,yit+ 3*dyit),(4.5*su,ht),33,["SET_FOCUS"]],
                            "txtRemark":["TextCtrl","",(xit + 3*dxit + 21*su,yit + 3*dyit),(29*su,ht),34,["TEXT"]],
                            "chkSel":["CheckBox","Selected",(xit + 3.5*dxit + 50*su, yit+3*dyit),(8*su,ht),35,["CHECKBOX"]],
                            "butChange":["Button","Change",(xit + 4*dxit + 58*su,yit+3*dyit),(5.3*su,ht),36,["BUTTON"]],
                            "butChangeClear":["Button","C",(xit + 4.8*dxit + 63*su,yit + 3*dyit),(2*su,ht),37,["BUTTON"]],

                            "cboChange":["ComboBox","",(xit + 6*dxit + 64*su, yit + 3*dyit),(7*su,ht),38,["COMBOBOX"]],
                            "labMsNum":["StaticText","MsNum",(xit,yit+4*dyit),(4*su,ht),40,["SET_FOCUS"]],
                            "txtMsNum":["TextCtrl","",(xit + 4*su + dxit,yit + 4*dyit),(8*su,ht),41,["TEXT"]],
                            "labModDate":["StaticText","ModDate",(xit + 2*dxit+12*su,yit+4*dyit),(6*su,ht),42,["SET_FOCUS"]],
                            "txtModDate":["TextCtrl","",(xit + 2*dxit + 18*su,yit + 4*dyit),(10*su,ht),43,["TEXT"]],
                            "labMsCur":["StaticText","Ms. curncy",(xit + 4*dxit+27*su,yit+4*dyit),(7*su,ht),44,["SET_FOCUS"]],
                            "txtMsCur":["TextCtrl","",(xit + 5*dxit + 34*su,yit + 4*dyit),(7*su,ht),45,["TEXT"]],
                            "txtMsLtext":["TextCtrl","",(xit + 6*dxit + 41*su,yit + 4*dyit),(30*su,2*ht),46,["TEXT"],["TE_MULTILINE"]],
                            "labUpdRels":["StaticText","Update links of:",(xit , yit+5*dyit),(9*su,ht),50,["SET_FOCUS"]],
                            "chkUpdLeft":["CheckBox","Ob.1",(xit + dxit + 9*su , yit+5*dyit),(6*su,ht),55,["CHECKBOX"]],
                            "chkUpdRight":["CheckBox","Ob.2",(xit + 2*dxit + 15*su , yit+5*dyit),(6*su,ht),60,["CHECKBOX"]],
                            "labMsLtext":["StaticText","Misc. long text",(xit +9*dxit+27*su,yit+5*dyit),(9*su,ht),65,["SET_FOCUS"]],
                            "labCreator":["StaticText","Creator",(xit,yit+6*dyit),(4*su,ht),100,["SET_FOCUS"]],
                            "txtCreator":["TextCtrl","",(xit + 4*su + dxit,yit + 6*dyit),(12*su,ht),105,["TEXT"]],
                            "labCreaDate":["StaticText","CreaDate",(xit +2*dxit + 17*su,yit+ 6*dyit),(6*su,ht),110,["SET_FOCUS"]],
                            "txtCreaDate":["TextCtrl","",(xit + 3*dxit + 23*su,yit + 6*dyit),(10*su,ht),115,["TEXT"]],
                            "labModSource":["StaticText","ModSource",(xit +4*dxit + 33*su,yit+ 6*dyit),(8*su,ht),120,["SET_FOCUS"]],
                            "txtModSource":["TextCtrl","",(xit + 5*dxit + 41*su,yit + 6*dyit),(31*su,ht),125,["TEXT"]],
                            "labProject":["StaticText","Project",(xit,yit+7*dyit),(4*su,ht),130,["SET_FOCUS"]],
                            "txtProject":["TextCtrl","",(xit + 4*su + dxit,yit + 7*dyit),(12*su,ht),135,["TEXT"]],
                            "labImportDate":["StaticText","ImportDate",(xit +2*dxit + 17*su,yit+ 7*dyit),(6*su,ht),140,["SET_FOCUS"]],
                            "txtImportDate":["TextCtrl","",(xit + 3*dxit + 23*su,yit + 7*dyit),(10*su,ht),145,["TEXT"]],
                            "labImportedFrom":["StaticText","Imported from",(xit +4*dxit + 33*su,yit+ 7*dyit),(9*su,ht),150,["SET_FOCUS"]],
                            "txtImportedFrom":["TextCtrl","",(xit + 5*dxit + 41*su,yit + 7*dyit),(31*su,ht),155,["TEXT"]],

                            "labNumPar":["StaticText","Num_parents",(xit,yit+8*dyit),(7*su,ht),160,["SET_FOCUS"]],
                            "txtNumPar":["TextCtrl","",(xit + 7*su + dxit,yit + 8*dyit),(3*su,ht),165,["TEXT"]],
                            "labNumChi":["StaticText","Num_children",(xit +2*dxit + 10*su,yit+ 8*dyit),(7*su,ht),170,["SET_FOCUS"]],
                            "txtNumChi":["TextCtrl","",(xit + 3*dxit + 17*su,yit + 8*dyit),(3*su,ht),175,["TEXT"]],
                            "labDepthLeft":["StaticText","Depth Left",(xit +4*dxit + 20*su,yit+ 8*dyit),(7*su,ht),180,["SET_FOCUS"]],
                            "txtDepthLeft":["TextCtrl","",(xit + 5*dxit + 27*su,yit + 8*dyit),(3*su,ht),185,["TEXT"]],
                            "labDepthRight":["StaticText","Depth Right",(xit +6*dxit + 30*su,yit+ 8*dyit),(7*su,ht),190,["SET_FOCUS"]],
                            "txtDepthRight":["TextCtrl","",(xit + 7*dxit + 37*su,yit + 8*dyit),(3*su,ht),195,["TEXT"]]
                            }
                    ],
                    [
                        ["main_startup","liConPanel",
                                {
                                'caption':"Query-definition",
                                'capvis':True,
                                'pinbut': True,
                                'maxbut': True,
                                'clobut': True,
                                'center': False,
                                'direct': 2,    # clockwise 1 above, 4 left, 5 middle
                                'layer': 2,     # middle 0, higher to the outside
                                'row':1,        # ? re-counting out-to-in on each side, sectorally placed
                                'posit':0,      # ? re-counting cnt-clockwise on each side, concentrally placed
                                'bestsize':(300,160),
                                'minsize':(300,150),
                                }],
                             {
                            "labQuery":["StaticText","Choose query-type:",(xit,yit),(20*su,ht),3,["SET_FOCUS"]],
                            "lstQuery":["ListBox","",(xit,yit+dzit),(13.8*su,3.8*dzit),6,["LISTBOX"]],
                            "lstQuerSub":["ListBox","",(xit + dxit+13*su,yit+dzit),(14*su,3.8*dzit),7,["LISTBOX"]],
                            "labTree":["StaticText","Tree-filter:",(xit, yit+5*dzit),(),9,["SET_FOCUS"]],
                            "chkMultiParent":["CheckBox","Include multi-parental objects",(xit+dxit+9*su, yit+5*dzit),(),11,["CHECKBOX"]],
                            "labTrRoot":["StaticText","Set root",(xit, yit+6*dzit),(9*su,ht),12,["SET_FOCUS"]],
                            "cboTrRoot":["ComboBox","",(xit+dxit+9*su, yit+6*dzit),(15*su,ht),15,["COMBOBOX"]],
                            "labDir":["StaticText","Query-direction",(xit, yit+7*dzit),(9*su,ht),18,["SET_FOCUS"]],
                            "lstDir":["ListBox","",(xit+dxit+9*su,yit+7*dzit),(15*su,2*ht),21,["LISTBOX"]],
                            "labTrDepth":["StaticText","Tree-depth",(xit, yit+9*dzit),(9*su,ht),24,["SET_FOCUS"]],
                            "cboTrDepth":["ComboBox","",(xit+dxit+9*su, yit+9*dzit),(15*su,ht),27,["COMBOBOX"]],
                            "butQuerTree":["Button","Query tree recs",(xit+1*su,yit+10*dzit),(),29,["BUTTON"]],
                            "labFlat":["StaticText","Flat filter (set criteria):",(xit, yit+11*dzit),(17*su,ht),30,["SET_FOCUS"]],
                            "butClear":["Button","Clear",(xit+dxit+16*su, yit+10.85*dzit),(5*su,ht),31,["BUTTON"]],
                            "chkValues":["CheckBox","Values",(xit+2*dxit+21*su, yit+11*dzit),(),32,["CHECKBOX"]],
                            "cboField1":["ComboBox","",(xit, yit+12*dzit),(7*su,ht),33,["COMBOBOX"],['CB_READONLY']],
                            "cboOperator1":["ComboBox","",(xit + dxit + 7*su, yit+12*dzit),(7*su,ht),35,["COMBOBOX"],['CB_READONLY']],
                            "cboValue1":["ComboBox","",(xit+2*dxit+14*su, yit+12*dzit),(12*su,ht),36,["COMBOBOX"]],
                            "cboField2":["ComboBox","",(xit, yit+13*dzit),(7*su,ht),39,["COMBOBOX"],['CB_READONLY']],
                            "cboOperator2":["ComboBox","",(xit + dxit + 7*su, yit+13*dzit),(7*su,ht),41,["COMBOBOX"],['CB_READONLY']],
                            "cboValue2":["ComboBox","",(xit+2*dxit+14*su, yit+13*dzit),(12*su,ht),42,["COMBOBOX"]],
                            "cboField3":["ComboBox","",(xit, yit+14*dzit),(7*su,ht),45,["COMBOBOX"],['CB_READONLY']],
                            "cboOperator3":["ComboBox","",(xit + dxit + 7*su, yit+14*dzit),(7*su,ht),46,["COMBOBOX"],['CB_READONLY']],
                            "cboValue3":["ComboBox","",(xit+2*dxit+14*su, yit+14*dzit),(12*su,ht),48,["COMBOBOX"]],
                            "txtCrit":["TextCtrl","",(xit, yit+15*dzit),(28*su,2*ht),50,["TEXT"],["TE_MULTILINE"]],
                            "butGetCrit":["Button","Get crit.",(xit+1*su,yit+17*dzit),(7*su,ht),53,["BUTTON"]],
                            "butQuerFlat":["Button","Get recs",(xit + dxit + 8*su,yit+17*dzit),(7*su,ht),56,["BUTTON"]],
                            "chkManualSql":["CheckBox","Show SQL crit.",(xit + 2*dxit +15*su, yit+17*dzit),(13*su,ht),59,["CHECKBOX"]],
                            "butExport":["Button","  Export query to text-file  ",(xit+1*su,yit+18*dzit),(),62,["BUTTON"]],
                            "butMetrics":["Button","Calc. metrics",(xit+20*su,yit+18*dzit),(7*su,ht),64,["BUTTON"]],

                            "labChange":["StaticText","Apply changes to the result:",(xit, yit+19*dzit),(20*su,ht),65,["SET_FOCUS"]],
                            "butDel":["Button","Delete shown records",(xit,yit+20*dzit),(),68,["BUTTON"]],
                            "chkEnableDel":["CheckBox","Enable mass-deletion",(xit + dxit +14*su, yit+20*dzit),(15*su,ht),71,["CHECKBOX"]],
                            "labUpdate":["StaticText","Set updatal field and value:",(xit + 8*su, yit+21*dzit),(20*su,ht),74,["SET_FOCUS"]],
                            "cboFldUpd":["ComboBox","",(xit, yit+22*dzit),(13*su,ht),77,["COMBOBOX"],['CB_READONLY']],
                            "txtValUpd":["TextCtrl","",(xit+dxit+15*su, yit+22*dzit),(12*su,ht),80,["TEXT"]],
                            "butUpd":["Button","Update shown records",(xit,yit+23*dzit),(),83,["BUTTON"]]
                             }
                    ],
                    [
                        ["main_startup","paramModPanel",
                                {
                                'caption':"Modify option",
                                'capvis':True,
                                'pinbut': True,
                                'maxbut': True,
                                'clobut': True,
                                'center': False,
                                'direct': 3,
                                'layer': 1,
                                'row':0,
                                'bestsize':(300,180),
                                'minsize':(300,180),
                                'posit':0,
                                }],
                             {
                            "labParidLab":["StaticText","ParamID:",(xit,yit),(10*su,ht),1,["SET_FOCUS"]],
                            "labParidValue":["StaticText","",(xit + dxit + 10*su,yit),(20*su,ht),2,["SET_FOCUS"]],
                            "labDTypeLab":["StaticText","Datatype:",(xit + 2*dxit + 30*su,yit),(10*su,ht),3,["SET_FOCUS"]],
                            "labDTypeValue":["StaticText","",(xit + 3*dxit + 40*su,yit),(20*su,ht),4,["SET_FOCUS"]],
                            "labNameLab":["StaticText","Name:",(xit,yit + dyit),(10*su,ht),5,["SET_FOCUS"]],
                            "labNameValue":["StaticText","",(xit + dxit + 10*su,yit + dyit),(60*su,ht),10,["SET_FOCUS"]],
                            "labDescripLab":["StaticText","Description:",(xit,yit + 2*dyit),(10*su,ht),15,["SET_FOCUS"]],
                            "labDescripValue":["StaticText","",(xit + dxit +10*su, yit + 2*dyit),(60*su,ht),20,["SET_FOCUS"]],
                            "labParamLab":["StaticText","Param-value:",(xit, yit + 3*dyit),(10*su,ht),25,["SET_FOCUS"]],
                            "cboParamValue":["ComboBox","",(xit+dxit+10*su, yit + 3*dyit),(60*su,ht),30,["COMBOBOX"]],
                            "labDefaultLab":["StaticText","Default value:",(xit+ 2*dxit+70*su, yit + 3*dyit),(8*su,ht),35,["SET_FOCUS"]],
                            "labDefaultValue":["StaticText","",(xit+ 3*dxit+80*su, yit + 3*dyit),(20*su,ht),38,["SET_FOCUS"]],
                            "butSave":["Button","Save value-change",(xit +dxit+10*su,yit +4*dyit),(),40,["BUTTON"]]
                            }
                    ],
                    [
                        ["main_startup","longTextPanel",
                                {
                                'caption':"Misc. long text - expanded",
                                'capvis':True,
                                'pinbut': True,
                                'maxbut': True,
                                'clobut': True,
                                'center': False,
                                'direct': 2,
                                'layer': 2,
                                'row':0,
                                'bestsize':(300,180),
                                'minsize':(300,180),
                                'posit':1,
                                }],
                             {
                            "txtLongText":["TextCtrl","",(0, 0),(5, 5),5,["TEXT"],["TE_MULTILINE"]]
                            }
                    ]
                ]

'''
ADAP HIS
-2d-dict
-panelname; and tablename
        -fieldname
            -controlname
            -handlingtype
'''

defDatadi = {'modPanel':
                ['Relations',
                {
                'RelID':['txtRelID','readonly'],
                'Subject':['cboSubject',''],
                'Object1':['cboOb1',''],
                'Relation':['cboRel',''],
                'Object2':['cboOb2',''],
                'Selected':['chkSel',''],
                'Change':['cboChange',''],
                'Remark':['txtRemark',''],
                'ModDate':['txtModDate',''],
                'Source':['cboSource',''],
                'MsNumber':['txtMsNum',''],
                'MsDate':['txtMsDate',''],
                'MsCurrency':['txtMsCur',''],
                'MsLongText':['txtMsLtext',''],
                'CreaDate':['txtCreaDate',''],
                'Creator':['txtCreator',''],
                'Project':['txtProject',''],
                'ImportDate':['txtImportDate',''],
                'ImportedFrom':['txtImportedFrom',''],
                'Num_parents':['txtNumPar',''],
                'Num_children':['txtNumChi',''],
                'Depth_left':['txtDepthLeft',''],
                'Depth_right':['txtDepthRight',''],
                'ModSource':['txtModSource','']
                }
                ]
                }

defDialogdi=    {
                'exportPanel':
                     {
                    "labFolderPath":["StaticText","Export-folder-path",(xit,yit),(15*su,ht),0,["SET_FOCUS"]],
                    "txtFoPaVal":["TextCtrl","Set in database-options",(xit + dxit + 15*su,yit),(35*su,ht),3,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],

                    "labFilePref":["StaticText","Export-file-prefix",(xit,yit + dyit),(15*su,ht),6,["SET_FOCUS"]],
                    "txtPrefix":["TextCtrl","",(xit+ dxit + 15*su,yit + dyit),(17*su,ht),9,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],

                    "labProject":["StaticText","Project-name and author",(xit,yit + 2*dyit),(15*su,1.5*ht),12,["SET_FOCUS"]],
                    "txtProject":["TextCtrl","",(xit + dxit + 15*su,yit + 2*dyit),(17*su,ht),15,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "txtFromAuthor":["TextCtrl","",(xit + dxit + 33*su, yit + 2*dyit),(17*su,ht),25,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],

                    "butPreview":["Button","Prepare file-name",(xit, yit + 3*dyit),(15*su,ht),30,["BUTTON"]],
                    "txtPreviewName":["TextCtrl","",(xit + dxit + 15*su,yit + 3*dyit),(35*su,ht),35,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],


                    "labDefFoldPath":["StaticText","Definition-folderpath",(xit,yit + 4*dyit),(15*su,ht),40,["SET_FOCUS"]],
                    "txtDeFoPaVal":["TextCtrl","",(xit + dxit + 15*su,yit + 4*dyit),(35*su,ht),45,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
##                    "labDeFoTip":["StaticText","Uses default-path if option is empty",(xit + 2*dxit + 45*su,yit + 5*dyit),(10*su,1.5*ht),50,["SET_FOCUS"]],

##                    "labDefFileName":["StaticText","Definition-file-name",(xit,yit + 6*dyit),(10*su,ht),55,["SET_FOCUS"]],
                    "butChooseFile":["Button","Definition-file",(xit,yit + 5*dyit),(15*su,ht),55,["BUTTON"]],
                    "txtDeFiNaVal":["TextCtrl","",(xit + dxit + 15*su,yit + 5*dyit),(35*su,ht),60,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],

                    "labLineSep":["StaticText","Line-separator",(xit, yit + 6*dyit),(15*su,1*ht),64,["SET_FOCUS"]],
                    "cboLineSep":["ComboBox","",(xit + dxit + 15*su, yit+ 6*dyit),(35*su,1*ht),68,["COMBOBOX"]],

                    "butExport":["Button","Export to text-file",(xit,yit + 7*dyit),(15*su,ht),70,["BUTTON"]],
                    "butOpenTargetFolder":["Button","Open target-folder",(xit,yit + 8*dyit),(15*su,ht),75,["BUTTON"]],
                    "chkEnableMail":["CheckBox","Enable email",(xit, yit + 9*dyit),(),80,["CHECKBOX"]],
                    "labStatus":["StaticText","Export your query-data",(xit + dxit + 15*su,yit + 7*dyit),(14*su,3*ht),85,["SET_FOCUS"]],

                    "labName":["StaticText"," Name-search (enter & pick)",(xit, yit + 10*dyit),(15*su,1*ht),90,["SET_FOCUS"]],
                    "labField":["StaticText"," Relation",(xit + dxit + 15*su, yit + 10*dyit),(10*su,1*ht),95,["SET_FOCUS"]],
                    "labEmail":["StaticText"," Email-address",(xit + 2*dxit + 25*su, yit + 10*dyit),(19*su,1*ht),100,["SET_FOCUS"]],
                    "cboName":["ComboBox","",(xit, yit + 11*dyit),(15*su,1*ht),105,["COMBOBOX","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "cboField":["ComboBox","",(xit + dxit + 15*su, yit+11*dyit),(10*su,1*ht),110,["COMBOBOX"]],
                    "cboEmail":["ComboBox","",(xit + 2*dxit + 25*su, yit + 11*dyit),(24*su,1*ht),115,["COMBOBOX","TEXT_ENTER"],["TE_PROCESS_ENTER"]],

                    "butAddToGroup":["Button","To more receivers",(xit,yit + 12*dyit),(15*su,ht),117,["BUTTON"]],
                    "txtEmailGroup":["TextCtrl","",(xit + dxit + 15*su, yit + 12*dyit),(30*su,ht),118,["TEXT"]],
                    "butSaveGroup":["Button","Save",(xit + 2*dxit + 45*su, yit + 12*dyit),(4*su,ht),119,["BUTTON"]],

                    "labSubject":["StaticText","Email subject",(xit,yit + 13*dyit),(15*su,ht),120,["SET_FOCUS"]],
                    "txtSubject":["TextCtrl","",(xit + dxit + 15*su,yit + 13*dyit),(35*su,ht),125,["TEXT"]],

                    "labText":["StaticText","Email text",(xit,yit + 14*dyit),(15*su,ht),130,["SET_FOCUS"]],
                    "txtText":["TextCtrl","",(xit + dxit + 15*su,yit + 14*dyit),(35*su,3*ht),135,["TEXT"],["TE_MULTILINE"]],

                    "chkAttach":["CheckBox","Attach file",(xit, yit + 2*ht + 15*dyit),(15*su,ht),140,["CHECKBOX"]],
                    "butEmail":["Button","Send email",(xit + dxit + 15*su, yit+ 2*ht + 15*dyit),(15*su,ht),150,["BUTTON"]]
                    },
                'importPanel':
                     {
                    "labImType":["StaticText","Import-type",(xit,yit),(10*su,ht),0,["SET_FOCUS"]],
                    "cboImType":["ComboBox","",(xit + dxit + 10*su, yit),(25*su,ht),3,["COMBOBOX"],['CB_READONLY']],
                    "labSource":["StaticText","Source-database:",(xit,yit + dyit),(10*su,ht),6,["SET_FOCUS"]],
                    "txtSource":["TextCtrl","",(xit, yit + 2*dyit),(30*su,ht),9,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "butSource":["Button","Choose file",(xit + dxit + 30*su, yit + 2*dyit),(),11,["BUTTON"]],
                    "labTarget":["StaticText","Target-database:",(xit,yit + 3*dyit),(10*su,ht),13,["SET_FOCUS"]],
                    "txtTarget":["TextCtrl","",(xit, yit + 4*dyit),(30*su,ht),15,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "butTarget":["Button","Choose file",(xit + dxit + 30*su, yit + 4*dyit),(),17,["BUTTON"]],
                    "chkEmpty":["CheckBox","Empty target-db before import (or you will merge the data)",(xit , yit + 7*dyit),(),21,["CHECKBOX"]],

                    "labProject":["StaticText","Project-name for import",(xit,yit + 3*dyit),(18*su,ht),24,["SET_FOCUS"]],
                    "txtProject":["TextCtrl","",(xit + dxit + 18*su, yit + 3*dyit),(25*su,ht),27,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "labFromAuthor":["StaticText","Imported from (author)",(xit,yit + 4*dyit),(18*su,ht),30,["SET_FOCUS"]],
                    "txtFromAuthor":["TextCtrl","",(xit + dxit + 18*su, yit + 4*dyit),(25*su,ht),33,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "labColSep":["StaticText","Column-separ.",(xit,yit + 5*dyit),(9*su,ht),36,["SET_FOCUS"]],
                    "txtColSep":["TextCtrl","",(xit + dxit + 8*su, yit + 5*dyit),(10*su,ht),39,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                    "labLineSep":["StaticText","Line sep",(xit + 2*dxit + 18*su,yit + 5*dyit),(7*su,ht),40,["SET_FOCUS"]],
                    "cboLineSep":["ComboBox","",(xit + 3*dxit + 24*su, yit + 5*dyit),(17*su,ht),41,["COMBOBOX"],['CB_READONLY']],

                    "butAnalyse":["Button","Probe the databases",(xit , yit + 6*dyit),(),42,["BUTTON"]],

##                    "chkMark":["CheckBox","Mark new records as 'selected'",(xit , yit + 7*dyit),(),22,["CHECKBOX"]],
                    "butImport":["Button","Import from source to target",(xit + 10*su + dxit, yit + 8*dyit),(),50,["BUTTON"]],
                    "labSrc":["StaticText","Source-info:",(xit, yit + 9*dyit),(20*su,ht),55,["SET_FOCUS"]],
                    "labTar":["StaticText","Target-info:",(xit + 20*su + dxit, yit + 9*dyit),(20*su,ht),60,["SET_FOCUS"]],
                    "labAnaSource":["StaticText","No valid source-info yet...",(xit,yit + 10*dyit),(20*su,2*ht),65,["SET_FOCUS"]],
                    "labAnaTarget":["StaticText","No valid target-info yet..",(xit + 20*su + dxit,yit + 10*dyit),(20*su,2*ht),70,["SET_FOCUS"]],
                    "labStatus":["StaticText","Status...",(xit,yit + 12*dyit),(45*su,2*ht),75,["SET_FOCUS"]]
                    },
                'thruportPanel':
                     {
                     "labFolderPathLab":["StaticText","Folder-path of text-files (editable in Options):",(xit ,yit),(),5,["SET_FOCUS"]],
                     "labFolderPathVal":["StaticText","",(xit + dxit ,yit + dyit),(),10,["SET_FOCUS"]],
                     "labAnnounceSequence":["StaticText","Sequence of exchanges to be made:",(xit ,yit + 2*dyit),(),12,["SET_FOCUS"]],
                     "txtImChaBranche":["TextCtrl","1",(xit,yit+3*dyit),(3*su,ht),15,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labImChaBranche":["StaticText","Import changes from previous multi-branche-list (if present)",(xit + 2*dxit +3*su,yit+ 3*dyit),(),20,["SET_FOCUS"]],
                     "txtImChaTask":["TextCtrl","2",(xit,yit + 4*dyit),(3*su,ht),25,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labImChaTask":["StaticText","Import changes from previous task-list (if present)",(xit + 2*dxit +3*su,yit + 4*dyit),(),30,["SET_FOCUS"]],
                     "txtImFile":["TextCtrl","3",(xit,yit + 5*dyit),(3*su,ht),35,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labImFile":["StaticText","Import new tree-items from import-file (if present)",(xit + 2*dxit +3*su,yit + 5*dyit),(),40,["SET_FOCUS"]],
                     "txtExBranche":["TextCtrl","4",(xit,yit + 6*dyit),(3*su,ht),45,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labExBranche":["StaticText","Export new multibranche-list",(xit + 2*dxit +3*su,yit + 6*dyit),(),50,["SET_FOCUS"]],
                     "txtExTask":["TextCtrl","5",(xit,yit + 7*dyit),(3*su,ht),55,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labExTask":["StaticText","Export new task-list",(xit + 2*dxit +3*su,yit + 7*dyit),(),60,["SET_FOCUS"]],
                     "txtNewImFile":["TextCtrl","6",(xit,yit + 8*dyit),(3*su,ht),65,["TEXT","TEXT_ENTER"],["TE_PROCESS_ENTER"]],
                     "labNewImFile":["StaticText","Overwrite import-file with new template",(xit + 2*dxit +3*su,yit + 8*dyit),(),70,["SET_FOCUS"]],
                     "cboSetActions":["ComboBox","",(xit, yit + 9*dyit),(30*su,ht),75,["COMBOBOX"]],
                     "labLineSep":["StaticText","Line separator:",(xit ,yit + 10*dyit),(10*su,ht),77,["SET_FOCUS"]],
                     "cboLineSep":["ComboBox","",(xit + dxit + 10*su, yit + 10*dyit),(19*su,ht),78,["COMBOBOX"],['CB_READONLY']],

                     "butDoActions":["Button","Execute the exchange-sequence",(xit,yit + 11*dyit),(),80,["BUTTON"]],
                    "labStatus":["StaticText","\n\n\n\n\n\n\n\n\n\n",(xit ,yit + 12*dyit),(30*su,12*ht),100,["SET_FOCUS"]]
                    },
                'recentDbPanel':
                     {
                    "labInfo":["StaticText","Select one of the previous databases and press button to open it:",(xit ,yit),(),5,["SET_FOCUS"]],
                    "lstDbs":["ListBox","",(xit, yit+dyit),(70*su,6*dyit),10,["LISTBOX"]],
                    "labStatus":["StaticText","None selected",(25*xit, yit + 2*dyit + 6*dyit),(),12,["SET_FOCUS"]],
                    "butOpenDb":["Button", "Open selected database",(25*xit,yit + 2*dyit + 7*dyit) ,(),15,["BUTTON"]]
                    }
                }

'''
UNIT INFO
field-name, column-order, width
'''

defLiscdi =     {'leftObjects':
                [[],
                    [
                    ['RelID',0,5],
                    ['Subject',1,100],
                    ['Object1',2, 200],
                    ['Relation',3, 150],
                    ['Object2',4, 1],
                    ['Change',5,25],
                    ['Selected',6,25],
                    ['Remark',7,75],
                    ['ModDate',8,50],
                    ['Source',9,75],
                    ['MsNumber',10,50],
                    ['MsDate',11,50],
                    ['MsCurrency',12,50],
                    ['MsLongText',13,50]
                    ]
                ],
                'rightObjects':
                [[],
                    [
                    ['RelID',0,5],
                    ['Change',1,40],
                    ['Subject',2,50],
                    ['Object1',3, 1],
                    ['Relation',4, 100],
                    ['Object2',5, 200],
                    ['Selected',6,25],
                    ['Remark',7,75],
                    ['ModDate',8,50],
                    ['Source',9,75],
                    ['MsNumber',10,50],
                    ['MsDate',11,50],
                    ['MsCurrency',12,50],
                    ['MsLongText',13,50]
                    ]
                ],
                'mainList':
                [[],
                    [
                    ['RelID',0,5],
                    ['Change',1,40],
                    ['Subject',2,100],
                    ['Object1',3, 1],
                    ['Relation',4, 150],
                    ['Object2',5, 200],
                    ['Selected',6,25],
                    ['Remark',7,75],
                    ['ModDate',8,50],
                    ['Source',9,75],
                    ['MsNumber',10,50],
                    ['MsDate',11,50],
                    ['MsCurrency',12,50],
                    ['MsLongText',13,50]
                    ]
                ],
                'taskList':
                [[],
                    [
                    ['RelID',0,5],
                    ['Week',1,45],
                    ['Day',2,40],
                    ['Date',3,50],
                    ['Time',4,40],
                    ['MsDate',5,0],
                    ['Change',6,40],
                    ['Object2',7, 200],
                    ['Relation',8, 60],
                    ['Object1',9, 150],
                    ['Subject',10,100],
                    ['Source',11,60],
                    ['ModDate',12,100],
                    ['Remark',13,75],
                    ['MsLongText',14,50],
                    ['MsNumber',15,50],
                    ['MsCurrency',16,50],
                    ['Selected',17,40],
                    ['Parents-number',18,40],
                    ['Children-number',19,40],
                    ['Left depth',20,40],
                    ['Right depth',21,40],
                    ['Project',22,60],
                    ['ImportDate',23,100],
                    ['ImportedFrom',24,60],
                    ['ModSource',25,150],
                    ['Creator',26,60],
                    ['CreaDate',27,100]
                    ]
                ],
                'tempRelations':
                [[],
                    [
                    ['RelID',0,50],
                    ['SortString',1,75],
                    ['Subject',2,50],
                    ['Object1',3, 150],
                    ['Relation',4, 80],
                    ['Depth',5, 50],
                    ['Object2',6, 200],
                    ['Selected',7,40],
                    ['Change',8,40],
                    ['ModDate',9,50],
                    ['Source',10,75],
                    ['MsDate',11,50],
                    ['MsLongText',12,50],
                    ['Remark',13,75],
                    ['MsNumber',14,50],
                    ['MsCurrency',15,150],
                    ['Parents-number',18,40],
                    ['Children-number',19,40],
                    ['Left depth',20,40],
                    ['Right depth',21,40],
                    ['Project',22,60],
                    ['ImportDate',23,100],
                    ['ImportedFrom',24,60],
                    ['ModSource',25,150],
                    ['Creator',26,60],
                    ['CreaDate',27,100]
                    ]
                ],
                'flatRelations':
                [[],
                    [
                    ['RelID',0,50],
                    ['Subject',1,100],
                    ['Object1',2, 175],
                    ['Relation',3, 150],
                    ['Object2',4, 250],
                    ['Change',5,40],
                    ['MsDate',6,50],
                    ['Selected',7,25],
                    ['Remark',8,75],
                    ['MsLongText',9,50],
                    ['Source',10,75],
                    ['ModDate',11,50],
                    ['MsNumber',12,50],
                    ['MsCurrency',13,150],
                    ['Parents-number',18,40],
                    ['Children-number',19,40],
                    ['Left depth',20,40],
                    ['Right depth',21,40],
                    ['Project',22,60],
                    ['ImportDate',23,100],
                    ['ImportedFrom',24,60],
                    ['ModSource',25,150],
                    ['Creator',26,60],
                    ['CreaDate',27,100]
                    ]
                ],
                'paramsList':
                [[],
                    [
                    ['ParamID',0,150],
                    ['Cluster',1,100],
                    ['Order',2,50],
                    ['Name',3, 150],
                    ['Description',5, 300],
                    ['IsEditableByUser',6, 100],
                    ['IsHiddenFromUser',7,0],
                    ['DataType',8,100]
                    ]
                ]
                }

defTexchangedi =  {'FDQ_RELS_TASKS_EXPORT':
                    [
                        ['Date',6],
                        ['Day',2],
                        ['Time',5],
                        ['MsDate',-1],
                        ['Change',3],
                        ['Object2',30],
                        ['Relation',3],
                        ['Object1',20],
                        ['Subject',8],
                        ['ModDate',10],
                        ['Source',5],
                        ['MsLongText',10],
                        ['RelID',6]
                    ],
                    'FDQ_RELS_MULTIBRANCHE_EXPORT':
                    [
                        ['SortString',13],
                        ['Object2',30],
                        ['Object1',20],
                        ['Change',4],
                        ['Relation',8],
                        ['MsDate',-1],
                        ['Depth',3],
                        ['RelID',6]
                    ]
                }

weekdaysdi = {1:'mon',2:'tue',3:'wed',4:'thur',5:'fri',6:'sat',7:'sun'}

defLiconSetsdi =        {
                        'tree-filter':
                        ['cboTrRoot','lstDir','cboTrDepth','butQuerTree',
                        'chkMultiParent'],
                        'flat-filter':
                        ['butQuerFlat','butClear','chkManualSql','butGetCrit',
                        'cboField1','cboOperator1','cboValue1',
                        'cboField2','cboOperator2','cboValue2',
                        'cboField3','cboOperator3','cboValue3', 'txtCrit'],
                        'change-set':
                        ['butUpd','chkEnableDel','cboFldUpd','txtValUpd']
                        }

mapQueryToExportDefParamdi = {
                        'Calendar / task-list':['export_definition_tasks',
                            'tasks','FDQ_RELS_TASKS'],
                        'Tree filter only':['export_definition_tree',
                            'tree','FDQ_RELS_TEMP_QUERY'],
                        'Tree and flat filter':['export_definition_tree',
                            'tree','FDQ_RELS_TEMP_QUERY'],
                        'Flat filter only':['export_definition_flat',
                            'flat','FDQ_RELATIONS_FLAT_FILTER']
                        }

prefiltersetsli =   [
                    ['object2',
                                [
                        ['object2','subs']
                                ]],
                    ['change',
                                [
                        ['change','subs']
                                ]],
                    ['source',
                                [
                        ['source','subs']
                                ]],
                    ['project',
                                [
                        ['project','subs']
                                ]]
                    ]
